package com.logistics.modules.sys.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logistics.modules.sys.entity.FreightcalculaterulesEntity;
import com.logistics.modules.transportationManagement.entity.CargoEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 
 * 
 * @author HURRICANE
 * @email HURRICANE@nb.com
 * @date 2022-05-06 16:47:20
 */
@Mapper
public interface FreightcalculaterulesDao extends BaseMapper<FreightcalculaterulesEntity> {

    IPage<FreightcalculaterulesEntity> selectAll(@Param("page") IPage<FreightcalculaterulesEntity> page,
                                                 @Param("name") String name,
                                                 @Param("cargoType") Integer cargoType,
                                                 @Param("cargoUnit") Integer cargoUnit,
                                                 @Param("sysStartAddress") String sysStartAddress,
                                                 @Param("sysEndAddress")String sysEndAddress);

    FreightcalculaterulesEntity selectOneByCargoTypeIdAndCargoUnitAndCargoNumberAndSysEndAddressAndSysStartAddress(@Param("cargoTypeId") Integer cargoTypeId, @Param("cargoUnit") String cargoUnit, @Param("cargoNumber") Integer cargoNumber, @Param("sysEndAddress") String sysEndAddress, @Param("sysStartAddress") String sysStartAddress);

    List<FreightcalculaterulesEntity> selectAllByCustomize(@Param("CargoTypeId") Integer cargoTypeId,
                                                           @Param("cargoUnit") Integer cargoUnit,
                                                           @Param("startAddress") String startAddress,
                                                           @Param("endAddress") String endAddress);

}
